<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <title>礼物愿望 - 心愿社交</title>
    <!-- Bootstrap 5 CSS -->
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet">
    <!-- Font Awesome 图标 -->
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css">
    
    <style>
        :root {
            --primary: #6366f1; /* 主色调：靛蓝色 */
            --primary-light: #a5b4fc;
            --primary-dark: #4f46e5;
            --secondary: #ec4899; /* 辅助色：粉色 */
            --accent: #f59e0b; /* 强调色：橙色 */
            --success: #10b981; /* 成功色：绿色 */
            --danger: #ef4444; /* 危险色：红色 */
            --text-primary: #1f2937;
            --text-secondary: #6b7280;
            --bg-light: #f3f4f6;
            --bg-white: #ffffff;
            --border-light: #e5e7eb;
            --radius: 10px;
            --shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
        }
        
        body {
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
            background-color: var(--bg-light);
            color: var(--text-primary);
            padding-top: 55px;
            padding-bottom: 70px;
        }
        
        /* 顶部导航 */
        .top-nav {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            height: 55px;
            background-color: var(--bg-white);
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 0 15px;
            z-index: 1000;
            border-bottom: 1px solid var(--border-light);
            box-shadow: var(--shadow);
        }
        
        .nav-title {
            font-size: 1.15rem;
            font-weight: 600;
            color: var(--primary-dark);
        }
        
        .nav-action {
            color: var(--text-secondary);
            background: none;
            border: none;
            font-size: 1.2rem;
            width: 40px;
            height: 40px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        
        .nav-action:hover {
            background-color: var(--bg-light);
        }
        
        /* 搜索栏 */
        .search-container {
            padding: 12px 15px;
            background-color: var(--bg-white);
            border-bottom: 1px solid var(--border-light);
        }
        
        .search-box {
            position: relative;
        }
        
        .search-input {
            width: 100%;
            padding: 11px 15px 11px 40px;
            border-radius: 30px;
            border: 1px solid var(--border-light);
            background-color: var(--bg-light);
            font-size: 0.9rem;
        }
        
        .search-input:focus {
            outline: none;
            border-color: var(--primary-light);
            box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.1);
        }
        
        .search-icon {
            position: absolute;
            left: 15px;
            top: 12px;
            color: var(--text-secondary);
        }
        
        /* 筛选工具栏 */
        .filter-toolbar {
            background-color: var(--bg-white);
            border-bottom: 1px solid var(--border-light);
            padding-bottom: 8px;
        }
        
        /* 分类标签筛选 */
        .category-tabs {
            display: flex;
            padding: 0 15px;
            overflow-x: auto;
            scrollbar-width: none;
            padding-top: 8px;
        }
        
        .category-tabs::-webkit-scrollbar {
            display: none;
        }
        
        .category-tab {
            flex: 0 0 auto;
            padding: 8px 16px;
            font-size: 0.85rem;
            font-weight: 500;
            color: var(--text-secondary);
            background: none;
            border: none;
            border-radius: 20px;
            margin-right: 8px;
            background-color: var(--bg-light);
        }
        
        .category-tab.active {
            color: var(--primary);
            background-color: rgba(99, 102, 241, 0.1);
        }
        
        /* 快捷筛选按钮组 */
        .quick-filters {
            display: flex;
            padding: 8px 15px 0;
            gap: 8px;
            overflow-x: auto;
            scrollbar-width: none;
        }
        
        .quick-filters::-webkit-scrollbar {
            display: none;
        }
        
        .quick-filter {
            flex: 0 0 auto;
            padding: 6px 12px;
            font-size: 0.8rem;
            background-color: var(--bg-light);
            border: 1px solid var(--border-light);
            border-radius: 4px;
            color: var(--text-secondary);
            display: flex;
            align-items: center;
            gap: 5px;
        }
        
        .quick-filter.active {
            background-color: var(--primary);
            color: white;
            border-color: var(--primary);
        }
        
        /* 高级筛选下拉面板 */
        .advanced-filters {
            padding: 0 15px;
            background-color: var(--bg-white);
            border-bottom: 1px solid var(--border-light);
        }
        
        .filter-section {
            padding: 12px 0;
            border-bottom: 1px solid var(--border-light);
        }
        
        .filter-section:last-child {
            border-bottom: none;
        }
        
        .filter-title {
            font-size: 0.9rem;
            font-weight: 600;
            margin-bottom: 10px;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        
        .filter-expand {
            color: var(--text-secondary);
            background: none;
            border: none;
            font-size: 0.8rem;
            display: flex;
            align-items: center;
            gap: 3px;
        }
        
        .filter-options {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
        }
        
        .filter-option {
            padding: 6px 12px;
            font-size: 0.8rem;
            border-radius: 20px;
            border: 1px solid var(--border-light);
            background-color: var(--bg-light);
            color: var(--text-secondary);
        }
        
        .filter-option.active {
            border-color: var(--primary);
            color: var(--primary);
            background-color: rgba(99, 102, 241, 0.1);
        }
        
        /* 价格范围滑块 */
        .price-slider-container {
            padding: 10px 0;
        }
        
        .price-slider {
            width: 100%;
            height: 4px;
            -webkit-appearance: none;
            appearance: none;
            background: var(--border-light);
            border-radius: 2px;
            outline: none;
        }
        
        .price-slider::-webkit-slider-thumb {
            -webkit-appearance: none;
            appearance: none;
            width: 16px;
            height: 16px;
            border-radius: 50%;
            background: var(--primary);
            cursor: pointer;
        }
        
        .price-range-display {
            display: flex;
            justify-content: space-between;
            font-size: 0.8rem;
            color: var(--text-secondary);
            margin-top: 8px;
        }
        
        /* 筛选操作栏 */
        .filter-actions {
            display: flex;
            padding: 12px 15px;
            background-color: var(--bg-white);
            justify-content: space-between;
            border-bottom: 1px solid var(--border-light);
        }
        
        .reset-filters {
            color: var(--text-secondary);
            background: none;
            border: none;
            font-size: 0.9rem;
            display: flex;
            align-items: center;
            gap: 5px;
        }
        
        .apply-filters {
            background-color: var(--primary);
            color: white;
            border: none;
            padding: 8px 20px;
            border-radius: 20px;
            font-size: 0.9rem;
            display: flex;
            align-items: center;
            gap: 5px;
        }
        
        /* 筛选器切换按钮 */
        .filter-toggle {
            width: 100%;
            background-color: var(--bg-white);
            border: none;
            padding: 10px 15px;
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 8px;
            color: var(--text-secondary);
            font-size: 0.9rem;
            border-bottom: 1px solid var(--border-light);
        }
        
        .filter-toggle i {
            transition: transform 0.3s ease;
        }
        
        .filter-toggle.collapsed i {
            transform: rotate(180deg);
        }
        
        /* 礼物愿望列表 */
        .gift-list {
            padding: 10px 15px;
        }
        
        /* 筛选结果提示 */
        .filter-results {
            padding: 10px 15px;
            background-color: rgba(99, 102, 241, 0.1);
            color: var(--primary-dark);
            font-size: 0.85rem;
            border-radius: var(--radius);
            margin: 0 15px 10px;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        
        .active-filters {
            display: flex;
            flex-wrap: wrap;
            gap: 5px;
        }
        
        .active-filter-tag {
            background-color: rgba(99, 102, 241, 0.2);
            padding: 2px 8px;
            border-radius: 10px;
            font-size: 0.75rem;
            display: flex;
            align-items: center;
            gap: 3px;
        }
        
        .clear-all-filters {
            font-size: 0.75rem;
            color: var(--primary-dark);
            background: none;
            border: none;
            text-decoration: underline;
        }
        
        /* 礼物卡片样式 */
        .gift-card {
            background-color: var(--bg-white);
            border-radius: var(--radius);
            margin-bottom: 12px;
            overflow: hidden;
            box-shadow: var(--shadow);
            transition: transform 0.2s ease;
        }
        
        .gift-card:hover {
            transform: translateY(-2px);
        }
        
        .gift-header {
            padding: 12px 15px;
            display: flex;
            align-items: center;
            gap: 10px;
            border-bottom: 1px solid var(--border-light);
        }
        
        .gift-avatar {
            width: 38px;
            height: 38px;
            border-radius: 50%;
            object-fit: cover;
        }
        
        .gift-user {
            flex: 1;
        }
        
        .user-name {
            font-size: 0.9rem;
            font-weight: 500;
            margin-bottom: 1px;
        }
        
        .gift-time {
            font-size: 0.75rem;
            color: var(--text-secondary);
        }
        
        .gift-content {
            padding: 12px 15px;
        }
        
        .gift-title {
            font-size: 1.05rem;
            font-weight: 600;
            margin-bottom: 6px;
            color: var(--text-primary);
            line-height: 1.4;
        }
        
        .gift-description {
            font-size: 0.85rem;
            line-height: 1.5;
            margin-bottom: 10px;
            color: var(--text-secondary);
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }
        
        /* 价格信息 */
        .gift-price {
            color: var(--danger);
            font-weight: 600;
            margin-bottom: 8px;
            font-size: 0.9rem;
            display: flex;
            align-items: center;
            gap: 5px;
        }
        
        /* 图片容器样式 */
        .gift-media {
            margin-bottom: 10px;
            border-radius: 6px;
            overflow: hidden;
        }
        
        .no-media {
            display: none;
        }
        
        .single-media {
            width: 100%;
        }
        
        .single-media img {
            width: 100%;
            height: 180px;
            object-fit: cover;
        }
        
        .multi-media {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 3px;
        }
        
        .media-item {
            aspect-ratio: 1/1;
            overflow: hidden;
        }
        
        .media-item img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }
        
        /* 礼物标签和状态 */
        .gift-meta {
            display: flex;
            flex-wrap: wrap;
            gap: 6px;
            margin-bottom: 8px;
        }
        
        .gift-tag {
            background-color: rgba(99, 102, 241, 0.1);
            color: var(--primary);
            font-size: 0.75rem;
            padding: 2px 8px;
            border-radius: 10px;
        }
        
        .gift-status {
            font-size: 0.75rem;
            padding: 2px 8px;
            border-radius: 10px;
            font-weight: 500;
        }
        
        .status-wishing {
            background-color: rgba(245, 158, 11, 0.1);
            color: var(--accent);
        }
        
        .status-received {
            background-color: rgba(16, 185, 129, 0.1);
            color: var(--success);
        }
        
        /* 互动区域 */
        .gift-actions {
            display: flex;
            justify-content: space-around;
            padding: 8px 0;
            border-top: 1px solid var(--border-light);
        }
        
        .action-btn {
            display: flex;
            align-items: center;
            justify-content: center;
            background: none;
            border: none;
            color: var(--text-secondary);
            font-size: 0.8rem;
            gap: 4px;
            flex: 1;
            padding: 5px 0;
        }
        
        .action-btn i {
            font-size: 0.9rem;
        }
        
        .action-btn:hover, .action-btn.active {
            color: var(--primary);
        }
        
        /* 底部悬浮按钮 */
        .add-gift-btn {
            position: fixed;
            right: 20px;
            bottom: 80px;
            width: 52px;
            height: 52px;
            border-radius: 50%;
            background-color: var(--primary);
            color: white;
            border: none;
            box-shadow: 0 3px 10px rgba(99, 102, 241, 0.3);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.3rem;
            z-index: 900;
        }
        
        /* 底部导航 */
        .bottom-nav {
            position: fixed;
            bottom: 0;
            left: 0;
            right: 0;
            height: 60px;
            background-color: var(--bg-white);
            display: flex;
            justify-content: space-around;
            align-items: center;
            border-top: 1px solid var(--border-light);
            z-index: 1000;
        }
        
        .nav-item {
            display: flex;
            flex-direction: column;
            align-items: center;
            color: var(--text-secondary);
            font-size: 0.7rem;
            text-decoration: none;
        }
        
        .nav-item i {
            font-size: 1.2rem;
            margin-bottom: 2px;
        }
        
        .nav-item.active {
            color: var(--primary);
        }
        
        /* 提示消息 */
        .toast-notification {
            position: fixed;
            bottom: 70px;
            left: 50%;
            transform: translateX(-50%);
            background-color: rgba(0, 0, 0, 0.7);
            color: white;
            padding: 7px 14px;
            border-radius: 4px;
            z-index: 9999;
            font-size: 0.85rem;
            opacity: 0;
            transition: opacity 0.3s ease;
        }
        
        .toast-notification.show {
            opacity: 1;
        }
        
        /* 加载更多 */
        .load-more {
            width: 100%;
            padding: 10px;
            margin: 8px 0 15px;
            background-color: var(--bg-white);
            border: 1px solid var(--border-light);
            border-radius: var(--radius);
            color: var(--text-secondary);
            font-size: 0.85rem;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
        }
        
        /* 空状态 */
        .empty-state {
            padding: 40px 20px;
            text-align: center;
            color: var(--text-secondary);
        }
        
        .empty-state i {
            font-size: 3rem;
            margin-bottom: 15px;
            color: var(--border-light);
        }
        
        .empty-state p {
            margin-bottom: 20px;
            font-size: 0.9rem;
        }
        
        .empty-state button {
            background-color: var(--primary);
            color: white;
            border: none;
            padding: 8px 16px;
            border-radius: 20px;
            font-size: 0.9rem;
        }
    </style>
</head>
<body>
    <!-- 顶部导航 -->
    <div class="top-nav">
        <button class="nav-action" id="backBtn">
            <i class="fas fa-arrow-left"></i>
        </button>
        <div class="nav-title">礼物愿望</div>
        <button class="nav-action" id="searchBtn">
            <i class="fas fa-search"></i>
        </button>
    </div>
    
    <!-- 搜索栏 (默认隐藏，点击搜索按钮显示) -->
    <div class="search-container" id="searchContainer" style="display: none;">
        <div class="search-box">
            <i class="fas fa-search search-icon"></i>
            <input type="text" class="search-input" placeholder="搜索礼物名称、标签或用户...">
        </div>
    </div>
    
    <!-- 筛选工具栏 -->
    <div class="filter-toolbar">
        <!-- 分类标签筛选 -->
        <div class="category-tabs">
            <button class="category-tab active">全部</button>
            <button class="category-tab">电子产品</button>
            <button class="category-tab">美妆护肤</button>
            <button class="category-tab">书籍文具</button>
            <button class="category-tab">服装配饰</button>
            <button class="category-tab">家居用品</button>
            <button class="category-tab">运动户外</button>
            <button class="category-tab">食品零食</button>
        </div>
        
        <!-- 快捷筛选按钮组 -->
        <div class="quick-filters">
            <button class="quick-filter">
                <i class="fas fa-clock"></i>
                <span>最新</span>
            </button>
            <button class="quick-filter">
                <i class="fas fa-fire"></i>
                <span>热门</span>
            </button>
            <button class="quick-filter">
                <i class="fas fa-tag"></i>
                <span>有图</span>
            </button>
            <button class="quick-filter">
                <i class="fas fa-check-circle"></i>
                <span>已实现</span>
            </button>
        </div>
    </div>
    
    <!-- 筛选器切换按钮 -->
    <button class="filter-toggle collapsed" id="filterToggle">
        <span>高级筛选</span>
        <i class="fas fa-chevron-up"></i>
    </button>
    
    <!-- 高级筛选面板 (默认折叠) -->
    <div class="advanced-filters-container" id="advancedFilters" style="display: none;">
        <!-- 高级筛选内容 -->
        <div class="advanced-filters">
            <!-- 价格范围筛选 -->
            <div class="filter-section">
                <div class="filter-title">
                    <span>价格范围</span>
                    <button class="filter-expand">
                        <span>自定义</span>
                        <i class="fas fa-chevron-down"></i>
                    </button>
                </div>
                
                <div class="filter-options">
                    <button class="filter-option">全部价格</button>
                    <button class="filter-option">¥0-50</button>
                    <button class="filter-option active">¥50-200</button>
                    <button class="filter-option">¥200-500</button>
                    <button class="filter-option">¥500-1000</button>
                    <button class="filter-option">¥1000以上</button>
                </div>
                
                <!-- 价格滑块 (默认隐藏) -->
                <div class="price-slider-container" style="display: none;">
                    <input type="range" min="0" max="5000" value="2000" class="price-slider" id="priceSlider">
                    <div class="price-range-display">
                        <span>¥0</span>
                        <span id="priceDisplay">¥2000</span>
                        <span>¥5000+</span>
                    </div>
                </div>
            </div>
            
            <!-- 礼物状态筛选 -->
            <div class="filter-section">
                <div class="filter-title">
                    <span>礼物状态</span>
                </div>
                
                <div class="filter-options">
                    <button class="filter-option active">全部状态</button>
                    <button class="filter-option">许愿中</button>
                    <button class="filter-option">已收到</button>
                </div>
            </div>
            
            <!-- 发布时间筛选 -->
            <div class="filter-section">
                <div class="filter-title">
                    <span>发布时间</span>
                </div>
                
                <div class="filter-options">
                    <button class="filter-option active">全部时间</button>
                    <button class="filter-option">今天</button>
                    <button class="filter-option">本周</button>
                    <button class="filter-option">本月</button>
                    <button class="filter-option">半年内</button>
                </div>
            </div>
            
            <!-- 特殊属性筛选 -->
            <div class="filter-section">
                <div class="filter-title">
                    <span>特殊属性</span>
                </div>
                
                <div class="filter-options">
                    <button class="filter-option">限量款</button>
                    <button class="filter-option">新品</button>
                    <button class="filter-option">热门款</button>
                    <button class="filter-option">定制款</button>
                </div>
            </div>
        </div>
        
        <!-- 筛选操作按钮 -->
        <div class="filter-actions">
            <button class="reset-filters">
                <i class="fas fa-redo-alt"></i>
                <span>重置筛选</span>
            </button>
            <button class="apply-filters">
                <span>应用筛选</span>
                <i class="fas fa-check"></i>
            </button>
        </div>
    </div>
    
    <!-- 筛选结果提示 -->
    <div class="filter-results">
        <div class="active-filters">
            <div class="active-filter-tag">
                价格: ¥50-200
                <button class="filter-tag-remove"><i class="fas fa-times"></i></button>
            </div>
        </div>
        <button class="clear-all-filters">清除全部</button>
    </div>
    
    <!-- 礼物愿望列表 -->
    <div class="gift-list" id="giftList">
        <!-- 多图礼物卡片 -->
        <div class="gift-card">
            <div class="gift-header">
                <img src="https://picsum.photos/id/64/100/100" alt="用户头像" class="gift-avatar">
                <div class="gift-user">
                    <div class="user-name">咖啡爱好者</div>
                    <div class="gift-time">2小时前</div>
                </div>
            </div>
            
            <div class="gift-content">
                <h3 class="gift-title">想要一套手冲咖啡器具套装</h3>
                <p class="gift-description">
                    最近对手冲咖啡很感兴趣，希望能有一套入门级的手冲套装，包含滤杯、手冲壶和磨豆机，预算在150-200元左右。
                </p>
                
                <div class="gift-price">
                    <i class="fas fa-rmb"></i>
                    <span>预算: ¥150-200</span>
                </div>
                
                <div class="gift-media multi-media">
                    <div class="media-item">
                        <img src="https://picsum.photos/id/431/300/300" alt="滤杯">
                    </div>
                    <div class="media-item">
                        <img src="https://picsum.photos/id/493/300/300" alt="手冲壶">
                    </div>
                    <div class="media-item">
                        <img src="https://picsum.photos/id/766/300/300" alt="磨豆机">
                    </div>
                </div>
                
                <div class="gift-meta">
                    <span class="gift-tag">家居用品</span>
                    <span class="gift-tag">咖啡</span>
                    <span class="gift-status status-wishing">许愿中</span>
                </div>
            </div>
            
            <div class="gift-actions">
                <button class="action-btn like-btn">
                    <i class="far fa-heart"></i>
                    <span>24</span>
                </button>
                <button class="action-btn comment-btn">
                    <i class="far fa-comment"></i>
                    <span>6</span>
                </button>
                <button class="action-btn share-btn">
                    <i class="far fa-share-alt"></i>
                    <span>分享</span>
                </button>
                <button class="action-btn save-btn">
                    <i class="far fa-bookmark"></i>
                    <span>收藏</span>
                </button>
            </div>
        </div>
        
        <!-- 单图礼物卡片 -->
        <div class="gift-card">
            <div class="gift-header">
                <img src="https://picsum.photos/id/26/100/100" alt="用户头像" class="gift-avatar">
                <div class="gift-user">
                    <div class="user-name">健身达人</div>
                    <div class="gift-time">5小时前</div>
                </div>
            </div>
            
            <div class="gift-content">
                <h3 class="gift-title">想要一副专业瑜伽垫</h3>
                <p class="gift-description">
                    一直在练习瑜伽，需要一副防滑效果好、厚度适中的专业瑜伽垫，最好是天然橡胶材质的，预算180元左右。
                </p>
                
                <div class="gift-price">
                    <i class="fas fa-rmb"></i>
                    <span>预算: ¥180</span>
                </div>
                
                <div class="gift-media single-media">
                    <img src="https://picsum.photos/id/176/800/400" alt="瑜伽垫">
                </div>
                
                <div class="gift-meta">
                    <span class="gift-tag">运动户外</span>
                    <span class="gift-tag">瑜伽</span>
                    <span class="gift-status status-wishing">许愿中</span>
                </div>
            </div>
            
            <div class="gift-actions">
                <button class="action-btn like-btn">
                    <i class="far fa-heart"></i>
                    <span>36</span>
                </button>
                <button class="action-btn comment-btn">
                    <i class="far fa-comment"></i>
                    <span>9</span>
                </button>
                <button class="action-btn share-btn">
                    <i class="far fa-share-alt"></i>
                    <span>分享</span>
                </button>
                <button class="action-btn save-btn">
                    <i class="far fa-bookmark"></i>
                    <span>收藏</span>
                </button>
            </div>
        </div>
        
        <!-- 无图礼物卡片 -->
        <div class="gift-card">
            <div class="gift-header">
                <img src="https://picsum.photos/id/91/100/100" alt="用户头像" class="gift-avatar">
                <div class="gift-user">
                    <div class="user-name">文学爱好者</div>
                    <div class="gift-time">昨天</div>
                </div>
            </div>
            
            <div class="gift-content">
                <h3 class="gift-title">想要余华的《活着》精装版</h3>
                <p class="gift-description">
                    一直想读余华的《活着》，希望能收到这本精装版图书，听说这是一本非常值得一读的文学作品。
                </p>
                
                <div class="gift-price">
                    <i class="fas fa-rmb"></i>
                    <span>参考价格: ¥59</span>
                </div>
                
                <div class="gift-media no-media"></div>
                
                <div class="gift-meta">
                    <span class="gift-tag">书籍文具</span>
                    <span class="gift-tag">文学</span>
                    <span class="gift-status status-wishing">许愿中</span>
                </div>
            </div>
            
            <div class="gift-actions">
                <button class="action-btn like-btn">
                    <i class="far fa-heart"></i>
                    <span>18</span>
                </button>
                <button class="action-btn comment-btn">
                    <i class="far fa-comment"></i>
                    <span>4</span>
                </button>
                <button class="action-btn share-btn">
                    <i class="far fa-share-alt"></i>
                    <span>分享</span>
                </button>
                <button class="action-btn save-btn">
                    <i class="far fa-bookmark"></i>
                    <span>收藏</span>
                </button>
            </div>
        </div>
        
        <!-- 双图礼物卡片 -->
        <div class="gift-card">
            <div class="gift-header">
                <img src="https://picsum.photos/id/22/100/100" alt="用户头像" class="gift-avatar">
                <div class="gift-user">
                    <div class="user-name">时尚搭配师</div>
                    <div class="gift-time">3天前</div>
                </div>
            </div>
            
            <div class="gift-content">
                <h3 class="gift-title">想要一条百搭丝巾</h3>
                <p class="gift-description">
                    秋天快到了，需要一条百搭的丝巾来搭配各种外套，看中了两款，一款是经典条纹的，另一款是碎花图案的。
                </p>
                
                <div class="gift-price">
                    <i class="fas fa-rmb"></i>
                    <span>预算: ¥120-180</span>
                </div>
                
                <div class="gift-media multi-media">
                    <div class="media-item">
                        <img src="https://picsum.photos/id/96/300/300" alt="条纹丝巾">
                    </div>
                    <div class="media-item">
                        <img src="https://picsum.photos/id/21/300/300" alt="碎花丝巾">
                    </div>
                </div>
                
                <div class="gift-meta">
                    <span class="gift-tag">服装配饰</span>
                    <span class="gift-tag">秋季</span>
                    <span class="gift-status status-wishing">许愿中</span>
                </div>
            </div>
            
            <div class="gift-actions">
                <button class="action-btn like-btn">
                    <i class="far fa-heart"></i>
                    <span>42</span>
                </button>
                <button class="action-btn comment-btn">
                    <i class="far fa-comment"></i>
                    <span>12</span>
                </button>
                <button class="action-btn share-btn">
                    <i class="far fa-share-alt"></i>
                    <span>分享</span>
                </button>
                <button class="action-btn save-btn">
                    <i class="far fa-bookmark"></i>
                    <span>收藏</span>
                </button>
            </div>
        </div>
        
        <!-- 已收到的礼物卡片 -->
        <div class="gift-card">
            <div class="gift-header">
                <img src="https://picsum.photos/id/65/100/100" alt="用户头像" class="gift-avatar">
                <div class="gift-user">
                    <div class="user-name">美食博主</div>
                    <div class="gift-time">1周前</div>
                </div>
            </div>
            
            <div class="gift-content">
                <h3 class="gift-title">收到了超好用的厨房料理机</h3>
                <p class="gift-description">
                    生日收到了朋友送的料理机，太实用了！可以做奶昔、研磨干粉，还能绞肉，终于不用再手动剁肉馅了，开心！
                </p>
                
                <div class="gift-price">
                    <i class="fas fa-rmb"></i>
                    <span>价格: ¥199</span>
                </div>
                
                <div class="gift-media single-media">
                    <img src="https://picsum.photos/id/292/800/400" alt="料理机">
                </div>
                
                <div class="gift-meta">
                    <span class="gift-tag">家居用品</span>
                    <span class="gift-tag">厨房</span>
                    <span class="gift-status status-received">已收到</span>
                </div>
            </div>
            
            <div class="gift-actions">
                <button class="action-btn like-btn">
                    <i class="far fa-heart"></i>
                    <span>56</span>
                </button>
                <button class="action-btn comment-btn">
                    <i class="far fa-comment"></i>
                    <span>18</span>
                </button>
                <button class="action-btn share-btn">
                    <i class="far fa-share-alt"></i>
                    <span>分享</span>
                </button>
                <button class="action-btn save-btn">
                    <i class="far fa-bookmark"></i>
                    <span>收藏</span>
                </button>
            </div>
        </div>
        
        <!-- 加载更多 -->
        <button class="load-more" id="loadMore">
            <i class="fas fa-spinner fa-spin"></i>
            <span>加载更多礼物愿望</span>
        </button>
    </div>
    
    <!-- 添加礼物愿望按钮 -->
    <button class="add-gift-btn" id="addGiftBtn">
        <i class="fas fa-plus"></i>
    </button>
    
    <!-- 底部导航 -->
    <div class="bottom-nav">
        <a href="#" class="nav-item">
            <i class="fas fa-home"></i>
            <span>首页</span>
        </a>
        <a href="#" class="nav-item">
            <i class="fas fa-star"></i>
            <span>心愿墙</span>
        </a>
        <a href="#" class="nav-item active">
            <i class="fas fa-gift"></i>
            <span>礼物</span>
        </a>
        <a href="#" class="nav-item">
            <i class="far fa-user"></i>
            <span>我的</span>
        </a>
    </div>
    
    <!-- Bootstrap JS Bundle with Popper -->
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
    
    <script>
        // 提示消息
        function showToast(message) {
            let toast = document.querySelector('.toast-notification');
            if (toast) {
                toast.remove();
            }
            
            toast = document.createElement('div');
            toast.className = 'toast-notification';
            toast.textContent = message;
            
            document.body.appendChild(toast);
            
            setTimeout(() => {
                toast.classList.add('show');
            }, 10);
            
            setTimeout(() => {
                toast.classList.remove('show');
                setTimeout(() => toast.remove(), 300);
            }, 2500);
        }
        
        // 搜索框切换显示
        const searchBtn = document.getElementById('searchBtn');
        const searchContainer = document.getElementById('searchContainer');
        
        searchBtn.addEventListener('click', () => {
            if (searchContainer.style.display === 'none') {
                searchContainer.style.display = 'block';
                searchContainer.querySelector('.search-input').focus();
            } else {
                searchContainer.style.display = 'none';
            }
        });
        
        // 搜索功能
        document.querySelector('.search-input').addEventListener('keypress', function(e) {
            if (e.key === 'Enter' && this.value.trim() !== '') {
                showToast(`搜索: ${this.value.trim()}`);
                
                // 模拟搜索加载
                simulateLoading();
            }
        });
        
        // 高级筛选面板切换
        const filterToggle = document.getElementById('filterToggle');
        const advancedFilters = document.getElementById('advancedFilters');
        
        filterToggle.addEventListener('click', () => {
            if (advancedFilters.style.display === 'none') {
                advancedFilters.style.display = 'block';
                filterToggle.classList.remove('collapsed');
            } else {
                advancedFilters.style.display = 'none';
                filterToggle.classList.add('collapsed');
            }
        });
        
        // 价格滑块交互
        const priceSlider = document.getElementById('priceSlider');
        const priceDisplay = document.getElementById('priceDisplay');
        const priceExpandBtn = document.querySelector('.filter-expand');
        const priceSliderContainer = document.querySelector('.price-slider-container');
        
        priceSlider.addEventListener('input', () => {
            priceDisplay.textContent = `¥${priceSlider.value}`;
        });
        
        priceExpandBtn.addEventListener('click', () => {
            if (priceSliderContainer.style.display === 'none') {
                priceSliderContainer.style.display = 'block';
                priceExpandBtn.querySelector('i').classList.add('rotate-180');
            } else {
                priceSliderContainer.style.display = 'none';
                priceExpandBtn.querySelector('i').classList.remove('rotate-180');
            }
        });
        
        // 分类标签切换
        const categoryTabs = document.querySelectorAll('.category-tab');
        categoryTabs.forEach(tab => {
            tab.addEventListener('click', () => {
                categoryTabs.forEach(t => t.classList.remove('active'));
                tab.classList.add('active');
                
                showToast(`已选择: ${tab.textContent}`);
                
                // 模拟筛选加载
                simulateLoading();
            });
        });
        
        // 快捷筛选按钮
        const quickFilters = document.querySelectorAll('.quick-filter');
        quickFilters.forEach(filter => {
            filter.addEventListener('click', () => {
                filter.classList.toggle('active');
                showToast(filter.classList.contains('active') ? 
                    `已筛选: ${filter.querySelector('span').textContent}` : 
                    `已取消: ${filter.querySelector('span').textContent}`);
                
                // 模拟筛选加载
                simulateLoading();
            });
        });
        
        // 高级筛选选项
        const filterOptions = document.querySelectorAll('.filter-option');
        filterOptions.forEach(option => {
            option.addEventListener('click', function() {
                // 同组内互斥选择
                const parentGroup = this.closest('.filter-options');
                parentGroup.querySelectorAll('.filter-option').forEach(opt => {
                    opt.classList.remove('active');
                });
                
                this.classList.add('active');
                
                showToast(`已选择: ${this.textContent}`);
            });
        });
        
        // 应用筛选按钮
        document.querySelector('.apply-filters').addEventListener('click', () => {
            showToast('筛选条件已应用');
            
            // 收起筛选面板
            advancedFilters.style.display = 'none';
            filterToggle.classList.add('collapsed');
            
            // 模拟筛选加载
            simulateLoading();
        });
        
        // 重置筛选按钮
        document.querySelector('.reset-filters').addEventListener('click', () => {
            // 重置所有筛选选项
            filterOptions.forEach(option => {
                option.classList.remove('active');
            });
            
            // 选中第一个选项
            document.querySelectorAll('.filter-options').forEach(group => {
                group.querySelector('.filter-option:first-child').classList.add('active');
            });
            
            showToast('已重置所有筛选条件');
        });
        
        // 清除单个筛选标签
        document.querySelectorAll('.filter-tag-remove').forEach(btn => {
            btn.addEventListener('click', function(e) {
                e.stopPropagation();
                this.closest('.active-filter-tag').remove();
                
                // 如果没有活跃筛选标签，隐藏整个筛选结果条
                if (document.querySelectorAll('.active-filter-tag').length === 0) {
                    document.querySelector('.filter-results').style.display = 'none';
                }
                
                showToast('已取消该筛选条件');
                simulateLoading();
            });
        });
        
        // 清除全部筛选
        document.querySelector('.clear-all-filters').addEventListener('click', () => {
            document.querySelectorAll('.active-filter-tag').forEach(tag => {
                tag.remove();
            });
            
            document.querySelector('.filter-results').style.display = 'none';
            
            // 重置所有筛选选项
            filterOptions.forEach(option => {
                option.classList.remove('active');
            });
            
            document.querySelectorAll('.filter-options').forEach(group => {
                group.querySelector('.filter-option:first-child').classList.add('active');
            });
            
            categoryTabs.forEach(t => t.classList.remove('active'));
            categoryTabs[0].classList.add('active');
            
            quickFilters.forEach(f => f.classList.remove('active'));
            
            showToast('已清除所有筛选条件');
            simulateLoading();
        });
        
        // 模拟加载状态
        function simulateLoading() {
            const giftList = document.getElementById('giftList');
            const originalContent = giftList.innerHTML;
            
            giftList.innerHTML = `
                <div class="d-flex justify-content-center p-5">
                    <div class="spinner-border text-primary" role="status">
                        <span class="visually-hidden">Loading...</span>
                    </div>
                </div>
            `;
            
            setTimeout(() => {
                giftList.innerHTML = originalContent;
                bindGiftEvents();
            }, 800);
        }
        
        // 绑定礼物卡片事件
        function bindGiftEvents() {
            // 点赞按钮
            document.querySelectorAll('.like-btn:not([data-bound])').forEach(btn => {
                btn.setAttribute('data-bound', 'true');
                btn.addEventListener('click', function(e) {
                    e.stopPropagation();
                    const icon = this.querySelector('i');
                    const countElem = this.querySelector('span');
                    let count = parseInt(countElem.textContent);
                    
                    if (icon.classList.contains('far')) {
                        icon.classList.remove('far');
                        icon.classList.add('fas');
                        this.classList.add('active');
                        countElem.textContent = count + 1;
                        showToast('点赞成功');
                    } else {
                        icon.classList.remove('fas');
                        icon.classList.add('far');
                        this.classList.remove('active');
                        countElem.textContent = count - 1;
                        showToast('已取消点赞');
                    }
                });
            });
            
            // 评论按钮
            document.querySelectorAll('.comment-btn:not([data-bound])').forEach(btn => {
                btn.setAttribute('data-bound', 'true');
                btn.addEventListener('click', function(e) {
                    e.stopPropagation();
                    const giftTitle = this.closest('.gift-card').querySelector('.gift-title').textContent;
                    showToast(`查看 "${giftTitle}" 的评论`);
                });
            });
            
            // 分享按钮
            document.querySelectorAll('.share-btn:not([data-bound])').forEach(btn => {
                btn.setAttribute('data-bound', 'true');
                btn.addEventListener('click', function(e) {
                    e.stopPropagation();
                    showToast('分享成功');
                });
            });
            
            // 收藏按钮
            document.querySelectorAll('.save-btn:not([data-bound])').forEach(btn => {
                btn.setAttribute('data-bound', 'true');
                btn.addEventListener('click', function(e) {
                    e.stopPropagation();
                    const icon = this.querySelector('i');
                    
                    if (icon.classList.contains('far')) {
                        icon.classList.remove('far');
                        icon.classList.add('fas');
                        this.classList.add('active');
                        showToast('已收藏');
                    } else {
                        icon.classList.remove('fas');
                        icon.classList.add('far');
                        this.classList.remove('active');
                        showToast('已取消收藏');
                    }
                });
            });
            
            // 卡片点击进入详情
            document.querySelectorAll('.gift-card:not([data-bound])').forEach(card => {
                card.setAttribute('data-bound', 'true');
                card.addEventListener('click', function() {
                    const giftTitle = this.querySelector('.gift-title').textContent;
                    showToast(`查看 "${giftTitle}" 的详情`);
                });
            });
        }
        
        // 加载更多
        document.getElementById('loadMore').addEventListener('click', function() {
            const btn = this;
            const originalText = btn.innerHTML;
            btn.innerHTML = '<i class="fas fa-spinner fa-spin"></i><span>加载中...</span>';
            btn.disabled = true;
            
            setTimeout(() => {
                btn.innerHTML = originalText;
                btn.disabled = false;
                showToast('已加载更多礼物愿望');
                
                // 复制并修改卡片添加到列表
                const giftList = document.getElementById('giftList');
                const firstCard = giftList.querySelector('.gift-card:first-of-type');
                
                if (firstCard) {
                    const clone = firstCard.cloneNode(true);
                    const randomId = Math.floor(Math.random() * 300) + 100;
                    clone.querySelector('.gift-avatar').src = `https://picsum.photos/id/${randomId}/100/100`;
                    
                    const times = ['2小时前', '昨天', '3天前', '1周前'];
                    clone.querySelector('.gift-time').textContent = times[Math.floor(Math.random() * times.length)];
                    
                    giftList.insertBefore(clone, btn);
                    bindGiftEvents();
                }
            }, 1500);
        });
        
        // 添加礼物按钮
        document.getElementById('addGiftBtn').addEventListener('click', () => {
            showToast('新建礼物愿望');
        });
        
        // 返回按钮
        document.getElementById('backBtn').addEventListener('click', () => {
            showToast('返回上一页');
        });
        
        // 页面加载完成后初始化
        window.addEventListener('DOMContentLoaded', () => {
            bindGiftEvents();
        });
    </script>
</body>
</html>

